/*------------------------------------------------------------------------
 *  Copyright (C) 2011  Luis M. de la Cruz Salas
 *
 *  This file is part of TUNA
 *
 *  TUNA is free software: you can redistribute it and/or modify
 *  it under the terms of the GNU General Public License as published by
 *  the Free Software Foundation, either version 3 of the License, or
 *  (at your option) any later version.
 *
 *  TUNA is distributed in the hope that it will be useful,
 *  but WITHOUT ANY WARRANTY; without even the implied warranty of
 *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 *  GNU General Public License for more details.
 *
 *  You should have received a copy of the GNU General Public License
 *  along with this program.  If not, see <http://www.gnu.org/licenses/>.
 ------------------------------------------------------------------------*/

#ifndef _UNIFORM_H_
#define _UNIFORM_H_

#include "Meshes/StructuredMesh.hpp"
#include <iostream>
#include <fstream>
#include <string>
#include <vector>

namespace Tuna {

template <typename T, int Dim> class Uniform;

/*!
 *  Specialization for uniform meshes in 1D.  
 */
template <typename T>
struct Typeinfo <Uniform<T, 1> > {
  typedef T prec_t;
  enum { Dim = 1 };
};

/*!
 *  Specialization for uniform meshes in 2D.  
 */
template <typename T>
struct Typeinfo <Uniform<T, 2> > {
  typedef T prec_t;
  enum { Dim = 2 };
};

/*!
 *  Specialization for uniform meshes in 3D.  
 */
template <typename T>
struct Typeinfo <Uniform<T, 3> > {
  typedef T prec_t;
  enum { Dim = 3 };
};

/*! 
 ***************************************************************************
 * Adaptor for uniform structured meshes on rectangular domains.
 ***************************************************************************
 *  \author  Luis M. de la Cruz [ Sun Oct 28 17:18:28 GMT 2010 ]
 ***************************************************************************
 */
template<class Tprec, int Dim>
class Uniform : public StructuredMesh<Uniform<Tprec, Dim> >  {

public:    
  Uniform() : StructuredMesh<Uniform<Tprec, Dim > >() { }
  ~Uniform() {}

  bool print() {
    std::cout << " Uniform < " << Dim << "D > >"
	      << "\n +-----+";
  }
protected:    

private:

};


} // Tuna namespace
 
#endif // _UNIFORM_H_
